package com.yangxk.kadmin.auth.beans;

import java.util.HashSet;
import java.util.Set;

/**
 * 权限白名单
 *
 * @author yangxk
 * @date 2018/9/7 17:43
 */
public class WhiteListBean {

    private final Set<String> whiteList = new HashSet<>();

    // 默认配置
    {
        whiteList.add("/login");
        whiteList.add("/logout");
        whiteList.add("/error"); // springboot异常处理请求
    }

    public Set<String> getWhiteList() {
        return whiteList;
    }

    public void addWhiteList(String whiteUrl) {
        this.whiteList.add(whiteUrl);
    }

    public void addWhiteList(Set<String> whiteLists) {
        this.whiteList.addAll(whiteLists);
    }
}
